import { ITag } from '@/interface';
import { $get, $post, $put, $delete } from '@/request/api';

export function fetchTagList(params) {
  return $get('/tag/list', params);
}

export function fetchCreateTag(data: ITag) {
  return $post('/tag/create', data);
}

export function fetchUpdateTag(data: ITag) {
  return $put(`/tag/update/${data.id}`, data);
}

export function fetchDeleteTag(id: number) {
  return $delete(`/tag/delete/${id}`);
}
